<!DOCTYPE html>
<html>
<head>
<title>/</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>

<script type="text/javascript" src="http://webb.mihulu.cn/static/admin/js/jquery.min.js?v=2.1.4" ></script>
 <!--<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>-->

<link href="http://webb.mihulu.cn/static/index/weui.min.css" rel="stylesheet">

<link href="http://webb.mihulu.cn/static/index/jquery-weui.css" rel="stylesheet" >

 <style>


html{cursor:pointer;}

li{ list-style-type:none;}


  
.login_coty{ margin:0 auto; width:98%;;  line-height:20px; font-size:12px;padding-top:2%; }



@media screen and (max-width:900px) {

a {
  text-decoration:none;
    color: #fff;
}

  p {
        margin: 0;padding: 0;
    }
    .top_menu_list{
      margin-top: 0px;
      text-align: center;
      background-image: linear-gradient(to right ,#CC0033,#CC0033);
      padding-bottom: 5px;
      border-radius: 0px 0px 5px 5px;
    }
    /*.top_menu_list a{*/
    /*  text-align: center;*/
      /*margin-left: 11px;*/
    /*  margin-top: 5px;*/
    /*  color: #fff;*/
    /*}*/
    .btn.cur {
      background: #FFFF00;
      color:#b14240;
    }
    .btns {
   
      width: auto;
      border: none;
      border-radius: 5px;
      float: left;
      display: block;
      overflow: hidden;
      padding: 0 0.4rem;
      line-height: 24px;
      font-size: 17px;
      font-weight:bold;
    }
    
    .fenlei{
        width: auto;
    }
    
    .fenlei a{
        width: auto;
        display: block;
        font-size: 16px;
        margin-top: 3px;
        float: left;
        width: 14%;
        -webkit-border-radius: .5em;
        font-weight:bold;
    }
   
    li .cover {
      border-radius: 6px;
    }
    li .tag {
      background-image: linear-gradient(to right , #e64340,#CC00FF);
      font-size: 11px;
      padding: 0px 10px;
      border-radius: 5px;
      display: block;
      text-align: center;
      color: #FFF;
      line-height: 14px;
    }
    #dg .item{
      line-height: 34px;
      height: 34px;
      padding: 0 10 0 10;
      margin: 0 10px;
      text-align: center;
      display: block;
      /*color: #FFF;*/
    }
    .clamp-2 {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    /* 弹出 */
    .weui-popup__modal {
      width: 96vw;
      left: 2vw;
      height: 425px;
      top: 15vh;
      border-radius:20px;
      background:rgba(0,0,0,0.3);
    }
    .weui-popup__modal .content { 
      background-size: cover;
      background-position: center;
      width: 100%;
      height: 260px;
      background-repeat: no-repeat;
      background-color: #000;
    }
    .weui-popup__modal #dialog-image {
      width: 100%;
      height: 100%;
    }
     .weui-popup__modal .footers {
      display: flex;
      /*background-color: #fff;*/
      justify-content: space-between;
      flex-wrap: nowrap;
      width: 96vw;
    }
    .weui-popup__modal .footerss {
      display: flex;
      background-color: #fff;
      justify-content: space-between;
      flex-wrap: nowrap;
      width: 96vw;
    }
    
    
    .weui-popup__modal .footer {
      display: flex;
      background-color: #fff;
      justify-content: space-between;
      flex-wrap: nowrap;
    }
    .weui-popup__modal .footer p {
      border-radius: 15px 15px 20px 20px;
      line-height: 50px;
      width: 50%;
      text-align: center;
      font-size: 14px;
      /*border-right: 1px solid #f0f0f0;*/
      color: #222;
      background-color: #f2f2f2;
    }
    .weui-popup__modal .footer #pay {
      color: #fff;
     
    }
    
    .weui-popup__modal .footerss a {
      line-height: 60px;
      width: 50%;
      text-align: center;
      font-size: 14px;
      /*border-right: 1px solid #f0f0f0;*/
      color: #222;
      background-color: #f2f2f2;
      display: block;
    }
    .weui-popup__modal .footerss #pay {
      color: #fff;
      background-image: linear-gradient(to right , #009eff,#CC00FF);
    }
    .div_1{
        width: 100%;
    }
    
    </style>
 
</head>
<body style="max-width:460px; margin:0 auto;font-weight:bold;">
 <div style="background-color: #FFFFFF;">
{if !empty($liebiao['url'])}

<div class="rich_media_content"  id="video" style="width: 100%; height: 150px;border: solid 1px #323136;padding-left:1px;"></div>
{/if}


</div>   
<a href="/index/index/tousu?uopenid={$uopenid}" style="position:fixed;display:block;bottom:38%;height:100px;right:3px;width:30px;z-index:999;  background-image: linear-gradient(to right , #009eff,#CC00FF); border-radius: 5px;text-align:center;color: #FFF;">
       问题反馈
</a>

<a href="<?php echo $liebiao['qie_url']?>" style="background-color:#EEC900;border-radius:6px;width:100%;font-size:15px;display:block;color:#CC0033;text-align:center;height:40px;margin-top:2px;line-height:40px">无法播放请点击:【<span class="rehuo">播放线路一</span>】</a>   
<a href="<?php echo $liebiao['qie_url1']?>" style="background-color:#CC0033;border-radius:6px;width:100%;font-size:15px;display:block;color:yellow;text-align:center;height:40px;margin-top:2px;line-height:40px">无法播放请点击:【<span class="rehuo">播放线路二</span>】</a> 

<div style="margin: 0 1px 12px;text-align: center;line-height: 12px;margin-bottom:20px"><span style="position: relative;top: 10px; color:#b14240;font-size: 18px;padding: 0 8px;font-weight:bold;" class="rehuo" >---------------热门推荐---------------</span></div>




	<div class="login_coty" style="background:#fff;width: 100%;" >
      <ul style="width: 100%; background:#FFFFFF;padding-left:0;margin:0px;display: -webkit-flex; -webkit-flex-wrap: wrap; display: flex; flex-wrap: wrap;" id="article_list">
        
      </ul>
      	<div style="clear: both"></div>
       	<!--<div class="jiaz" style="display: none;">正在加载中...</div>-->
    </div>






<div id="pay_dialog" class="weui-popup__container"  style="z-index:99999">
  <div class="weui-popup__overlay" style="background-color: rgba(0, 0, 0, 0.9)" ></div>
  
  <div class="weui-popup__modal" style="height:520px;top: 10vh;border-radius:0">
    <div class="container">
      <div class="content" id="content" style="border:1px solid #FFFFFF; width: 95.5vw;height: 320px">
          
           <img id="beijing" src="" data-src="" width="100%" height="320"/>
      </div>
       <div class="footers" style="width:100%">
           <p id="name" class="close-popups" style="height:80px;background-color:#474747;color:#FFFFFF;font-size:18px;width:100%;border-radius: 0px 0px 15px 15px;overflow: hidden;"></p>
      </div>
      
      <div class="footer" style="background:rgba(0,0,0,0.9);">
       
        <p id="pay" rel="payButton" style="font-size:22px;background-color:Yellow;color:#e64340; width: 360px;
    margin: auto;height:60px;line-height:60px"></p>
     
      </div>
      
       <div class="footerss" style="">
      
          <a id="cancel" class="close-popup"  href="javascript:void(0);" style="width:100%;font-size:18px;position:absolute;background:rgba(0,0,0,0.2);color:#FFFFFF">取消</a>
     
      </div>
    
         
    </div>
  </div>
</div>






<script type="text/javascript">
 
 
     $(window).scroll(function (event) {
        var wScrollY = window.scrollY; // 当前滚动条位置  
        var wInnerH = window.innerHeight; // 设备窗口的高度（不会变）  
        var bScrollH = document.body.scrollHeight; // 滚动条总高度  
        
    });
           
        
            let page = 2;
            var type = 0;
            var flag = 0;
            var lock = 0;
            var userid  = '{$userid}';
            var ddh     = '{$ddh}';
            var uopenid = '{$uopenid}';
            var sousuo  = "";
            var url     = "";
            var sptype     = "{$sptype}";
            var server_name = '{:url("shuju")}';
            var re_url = server_name;
            loadNav();
            
            function loadNav() {
                loadXMLDoc(2, page);
            }
            
            //顶部
            
            function backTop(){
               $(window).scrollTop(0);
            }
            
            //点击图片
           $(document).on('click', ".video-item", function () {
            if(type == 1000){
                // let src = $(this).data('src');
                let face = $(this).find('img').attr("src");
                url     = $(this).data('url');
                
                $("#name").text($(this).data('name'));
               
                $("#beijing").attr("src", face);
                $("#pay").text('免费观看');
                $("#pay_dialog").popup();
        
            }else{
                //- test1事件
                // let src = $(this).data('src');
                let face = $(this).find('img').attr("src");
                
              
                let money = $(this).data('money');
              
                url = $(this).data('url');
           
                $("#beijing").attr("src", face);
                $("#pay").text('付 款 '+money+' 元 观 看');
                 $("#name").text($(this).data('name'));
                $("#pay_dialog").popup();
            }
            
        
          });
          
            //点击支付
        
            $("[rel^='payButton']").click(function() {
            //   $.closePopup();
              
               window.location.href = url;
             
             
            });
            
            //点击分类
            
            $(document).on('click', ".btn", function () {
        
               
                 
                arr=[];
                $(window).scrollTop(0);
                
                sousuo = '';
                type = $(this).data('mid');
                $('.btn').removeClass('cur');
                $(this).addClass('cur');
                page = 1;
                loadXMLDoc(2, page);
          });
            
            
            $(document).on('click', ".sousuo", function () {
     
     
              sousuo = $('input[name="sousuo"]').val();
              
              
              
              loadXMLDoc(2, page);
               
          });
          
            function preView(blob,element){
                let reader    = new FileReader();
                reader.readAsDataURL(blob);
                reader.onload = function(e) {
                    element.src = e.target.result;
                }
            }
            function jsReadFiles(blob,element) {
                var reader = new FileReader();
                if(/image+/.test(blob.type)) {
                    reader.readAsArrayBuffer(blob);
                    reader.onload = function() {
                        var result  = new Blob([this.result.slice(4)], {type: 'image/jpeg'});
                        preView(result,element);
                    }
                }
            }
            function resetImgUrl(imgObj,maxErrorNum){
                let xmlhttp=new XMLHttpRequest();
                xmlhttp.open("GET",imgObj.getAttribute("src2")+'_.jpg',true);
                xmlhttp.responseType = "blob";
                xmlhttp.onreadystatechange = function () {
                    if (xmlhttp.readyState == xmlhttp.DONE) {
                        if (xmlhttp.status == 200) {
                            jsReadFiles(xmlhttp.response,imgObj);
                            imgObj.onerror=null;
                        }
                    }
                };
                xmlhttp.send(null);
            }
            
          
            
            function loadXMLDoc(curr, tpage , searchname) {
               
                
                var re_parameters = '?userid=' + userid + '&ddh=' + ddh + '&type=' + type + '&uopenid=' + uopenid + '&sousuo=' + sousuo + '&page=' + page+'&sptype='+sptype;
                var url = re_url + re_parameters;
                var xmlhttp;
                if (window.XMLHttpRequest) {
                    xmlhttp = new XMLHttpRequest();
                } else {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                console.log("add begin");
                xmlhttp.onreadystatechange = function () {
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                       
                        var res = JSON.parse(xmlhttp.responseText);
                         
                        if (res.length == 0) {
                            var lis = '<li style="text-align: center;margin-top:50px;width:100%;color:red">暂无数据</li>';
                        } else {
                            var lis = '';
                            
                            for (var i = 0; i < res.length; i++) {
                                var data_info = res[i];
                                var data = `<li style="max-width: 50%; min-width: 46%; margin: 0 1px 1px 1px; flex: 1;" data-id="`+data_info.id+`" data-src="" data-money="`+data_info.money+`" data-name ="`+data_info.name+`" data-target="#pay_dialog" data-url="`+data_info.dwz+`" class="video-item" >
                                <div class="video_img" style="position:relative"> 
                                 
                                    <div style="position: relative; width: 100%;height: 140px;background:black;">
                                      
                                      <img id="image01" class="cover" src="" src2="`+data_info.photo+`" onerror='resetImgUrl(this,3)' data-src="" width="100%" height="140"/>
                                    </div>
                                 
                                  <span class="tag" style="padding: 0px 5px;font-size:8px;position: absolute;top: 125px;background:rgba(0, 0, 0, 0.6);word-spacing:0px;font-weight: normal" >已有`+data_info.d1+`人付款<span style="color:#e64340;font-size:10px">`+data_info.money+`</span>元观看</span>
                                   <span class="tag" style="padding: 0px 5px;font-size:12px;position: absolute;top: 1px;background:rgba(0, 0, 0, 0.3);word-spacing:0px;font-weight: normal" >`+data_info.count+`</span>
                                </div>
                                  <div class="video_title" style="font-size: 15px; overflow: hidden;">
                                    
                                  <p style="color: #181818; font-size: 15px;font-weight:1000;border: solid 1px 	#A9A9A9; border-radius:3px;display:block;height:40px" href='javascript: void(0);' class="clamp-2"><span>`+data_info.fuhao+`</span>`+data_info.name+`</p>
                                </div>
                              </li>`;
                                  lis += data;
                              
                            }
                        }
                        document.getElementById("article_list").innerHTML = lis;
                    }
                }
                xmlhttp.open("GET", url, true);
                xmlhttp.send();
            }
            
            
            
            

            function loadXMLDoc2(curr, page) {
              
                var re_parameters = '?userid=' + userid + '&ddh=' + ddh + '&type=' + type + '&uopenid=' + uopenid + '&sousuo=' + sousuo + '&page=' + page+'&sptype='+sptype;
                var url = re_url + re_parameters;
                
                var xmlhttp;
                if (window.XMLHttpRequest) {
                    xmlhttp = new XMLHttpRequest();
                } else {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                console.log("add begin");
                xmlhttp.onreadystatechange = function () {
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                        var res = JSON.parse(xmlhttp.responseText);
                        for (var i = 0; i < res.length; i++) {
                            var data_info = res[i];
                            var data = `<li style="max-width: 50%; min-width: 46%; margin: 0 1px 1px 1px; flex: 1;" data-id="`+data_info.id+`" data-src="" data-money="`+data_info.money+`" data-name ="`+data_info.name+`" data-target="#pay_dialog" data-url="`+data_info.dwz+`" class="video-item" >
                                <div class="video_img" style="position:relative"> 
                                 
                                    <div style="position: relative; width: 100%; height: 140px;background:black;">
                                      
                                      <img id="image01" class="cover" src="" src2="`+data_info.photo+`" onerror='resetImgUrl(this,3)' data-src="" width="100%" height="140"/>
                                    </div>
                                 
                                  <span class="tag" style="padding: 0px 5px;font-size:8px;position: absolute;top: 125px;background:rgba(0, 0, 0, 0.6);word-spacing:0px;font-weight: normal" >已有`+data_info.d1+`人付款<span style="color:#e64340;font-size:10px">`+data_info.money+`</span>元观看</span>
                                   <span class="tag" style="padding: 0px 5px;font-size:12px;position: absolute;top: 1px;background:rgba(0, 0, 0, 0.3);word-spacing:0px;font-weight: normal" >`+data_info.count+`</span>
                                </div>
                                 <div class="video_title" style="font-size: 15px; overflow: hidden;">
                                    
                                  <p style="color: #181818; font-size: 15px;font-weight:1000;border: solid 1px 	#A9A9A9; border-radius:3px;display:block;height:40px" href='javascript: void(0);' class="clamp-2"><span>`+data_info.fuhao+`</span>`+data_info.name+`</p>
                                </div>
                              </li>`;
                                
                            var d1 = document.getElementById('article_list');
                            d1.insertAdjacentHTML('beforeend', data);
                        }
                    }
                }
                xmlhttp.open("GET", url, true);
                xmlhttp.send();
            }

            var scrollFunc = function (e) {
                var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
                var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
                var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
                console.log('scrollHeight ' + scrollHeight + '  windowHeight' + windowHeight + ' scrollTop' + scrollTop);
                var scrollBottom = scrollHeight - windowHeight - scrollTop;
                console.log('scrollBottom ' + scrollBottom);
               
                if ((scrollBottom <= 1) ) {
                    console.log('append begin');
                    page += 1;
                    loadXMLDoc2(1, page);
                }
            }
            window.onscroll = window.onscroll = scrollFunc;


</script>

<script type="text/javascript" src="http://webb.mihulu.cn/ckplayer/ckplayer.js"></script>

<script src="http://webb.mihulu.cn/static/index/jquery-weui.js" charset="UTF-8"></script>



{if !empty($liebiao['url'])}
<script type="text/javascript">
var videoObject = {
container: '#video',
variable: 'player', 
loop: true,
loaded: 'loadedHandler', //当播放器加载后执行的函数
debug: true, //是否开启调试模式
autoplay: true, 
poster: '', 
video:'<?php echo  $liebiao['url']?>'
};
var player = new ckplayer(videoObject);

function loadedHandler() {
            player.addListener('error', errorHandler); //监听视频加载出错
            // player.addListener('loadedmetadata', loadedMetaDataHandler); //监听元数据
            // player.addListener('duration', durationHandler); //监听播放时间
            player.addListener('time', timeHandler); //监听播放时间
            // player.addListener('play', playHandler); //监听暂停播放
            // player.addListener('pause', pauseHandler); //监听暂停播放
            // player.addListener('buffer', bufferHandler); //监听缓冲状态
            // player.addListener('seek', seekHandler); //监听跳转播放完成
            // player.addListener('seekTime', seekTimeHandler); //监听跳转播放完成
            // player.addListener('volume', volumeChangeHandler); //监听音量改变
            // player.addListener('full', fullHandler); //监听全屏/非全屏切换
            // player.addListener('ended', endedHandler); //监听播放结束
            // player.addListener('screenshot', screenshotHandler); //监听截图功能
            // player.addListener('mouse', mouseHandler); //监听鼠标坐标
            // player.addListener('frontAd', frontAdHandler); //监听前置广告的动作
            // player.addListener('wheel', wheelHandler); //监听视频放大缩小
            // player.addListener('controlBar', controlBarHandler); //监听控制栏显示隐藏事件
            // player.addListener('clickEvent', clickEventHandler); //监听点击事件
            // player.addListener('definitionChange', definitionChangeHandler); //监听清晰度切换事件
            // player.addListener('speed', speedHandler); //监听加载速度
 }
 
var watchTime = 0;
function timeHandler(time) {
    watchTime = time;        
}

function errorHandler() {
    var  uopenid = '<?php echo  $liebiao['url']?>';
    
    var  zyid  = '<?php echo  $liebiao['id']?>';
  
    var  xinlu = '<?php echo  $xianlu?>';
    
    var xianlu1 = '<?php echo $liebiao['qie_url']?>';
    
    var xianlu2 = '<?php echo $liebiao['qie_url1']?>';
    
    if(watchTime < 180 && xinlu == 0){
         $.post('{:url("paycount")}',{
           uopenid:uopenid,zyid:zyid,xinlu:xinlu
    	}, function(data){    
    
    	});
        window.location.href = xianlu1; 
    }
    
    if(watchTime < 180 && xinlu == 1){
         $.post('{:url("paycount")}',{
           uopenid:uopenid,zyid:zyid,xinlu:xinlu
    	}, function(data){    
    
    	});
        window.location.href = xianlu2; 
    }
    
//     $.post('{:url("paycount")}',{
//           uopenid:uopenid
// 	}, function(data){    

// 	});
    console.log('出错')
    // changeText('.playerstate', '状态：视频加载错误，停止执行其它动作，等待其它操作');
}

</script>
{/if}


<div id="dg" style="z-index: 9999;
    position: fixed ! important;
    left: 0;
    bottom: 0;
    width: 100%;
    background-image: linear-gradient(to right , #e64340,#a500ff);
    color: #fff;
    font-size: 16px;
    display: flex;
    height: 45px;
    justify-content:center;">
   
<a class="item" href="{$liebiao['bei_url']}" data-mid="0" style="margin: 8px 18px;top:50%;">返回首页</a>
<a class="item btn" href="javascript:void(0);" data-mid="1000" style="color:#b14240;;margin: 8px 25px;width:70px;top:50%;background-color:Yellow;border-radius: 5px;"><span style="font-weight: 1000;">＋</span>已购买</a>
<a class="item btn" href="javascript:void(0);" data-mid="160" style="margin: 8px 18px;top:50%;border-radius: 5px;">热门推荐</a>
<!--<p class="item"  style="font-weight:bold;margin: 8px 20px;" onclick="backTop()"></p>-->
   
</div>

<script>
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    });
</script>

</body>
</html>